<template>
  <footer class="footer">
    <span class="todo-count">剩余<strong>{{taskStatusList.length}}</strong></span>
    <ul class="filters">
      <li>
        <a :class="{selected:taskStatus==='all'}" href="javascript:;" @click="taskStatusToAll">全部</a>
      </li>
      <li>
        <a :class="{selected:taskStatus==='no'}" href="javascript:;" @click="taskStatusToNo">未完成</a>
      </li>
      <li>
        <a :class="{selected:taskStatus==='yes'}" href="javascript:;" @click="taskStatusToYes">已完成</a>
      </li>
    </ul>
    <button class="clear-completed" @click="delYestask">清除已完成</button>
  </footer>
</template>

<script>
import { mapGetters,mapMutations,mapState } from 'vuex';
export default {
  computed: {
    ...mapState(['taskStatus']),
    ...mapGetters(['taskStatusList'])
  },
  methods: {
    ...mapMutations(['taskStatusToYes','taskStatusToNo','taskStatusToAll','delYestask'])
  }
}
</script>
